﻿@model IEnumerable<MVCSoict.Models.Lesson>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.starttime)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.endtime)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.cid)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.cname)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.room)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.details)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.sid)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.User.password)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr >
        <td>
            @Html.DisplayFor(modelItem => item.starttime)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.endtime)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.cid)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.cname)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.room)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.details)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.sid)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.User.password)
        </td>
        <td>
           @Html.Partial("ControlPartial")
        </td>
    </tr>
}

</table>
